package com.irdstudio.efp.flow.service.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.irdstudio.efp.flow.service.domain.BizFlowRoute;
import com.irdstudio.efp.flow.service.vo.BizFlowRouteVO;
/**
 * <p>DAO interface:业务流转路由信息				<p>
 * @author ligm
 * @date 2018-05-05
 */
public interface BizFlowRouteDao {
	
	public int insertBizFlowRoute(BizFlowRoute bizFlowRoute);
	
	public int deleteByPk(BizFlowRoute bizFlowRoute);
	
	public int deleteByBizFlowId(String bizFlowId);
	
	public int deleteByFlowIdAndEventId(BizFlowRoute bizFlowRoute);
	
	public int updateByPk(BizFlowRoute bizFlowRoute);
	
	public BizFlowRoute queryByPk(BizFlowRoute bizFlowRoute);
	
	public List<BizFlowRoute> queryAllOwnerByPage(BizFlowRouteVO bizFlowRoute);
	
	public List<BizFlowRoute> queryAllCurrOrgByPage(BizFlowRouteVO bizFlowRoute);
	
	public List<BizFlowRoute> queryAllCurrDownOrgByPage(BizFlowRouteVO bizFlowRoute);
	
	public List<BizFlowRoute> queryAllBySourceNodeId(BizFlowRoute bizFlowRoute);
	
	public List<BizFlowRoute> queryAllByEventId(BizFlowRouteVO bizFlowRoute);
	
	/**
	 * 根据业务流程ID查询
	 * @param bizFlowId
	 * @return
	 */
	public List<BizFlowRoute> queryBizFlowRouteByBizFlowId(@Param("bizFlowId") String bizFlowId);
	
	/**
	 * 批量插入
	 * @param list
	 * @return
	 */
	public int batchInsertBizFlowRoute(@Param("list") List<BizFlowRoute> list);
	
	/**
	 * 查询两个业务流程不同的路由配置
	 * @param srcBizFlowId
	 * @param targetBizFlowId
	 * @return
	 */
	public List<BizFlowRoute> queryDiffRouteFromTwoBizFlow(@Param("srcBizFlowId") String srcBizFlowId, @Param("targetBizFlowId") String targetBizFlowId);

}
